<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String m = request.getParameter("m");
    String n = request.getParameter("n");
    if (m == null) {
        m = "";
    }
    if (n == null) {
        n = "";
    }
%>
<form>
    <label for="m">请输入整数m</label>
    <input type="number" id="m" name="m" value="<%=m%>">
    <label for="n">请输入整数n</label>
    <input type="number" id="n" name="n" value="<%=n%>">
    <input type="submit" value="确认">
</form>
<%
    int sum = 0;
    if (!m.equals("") && !n.equals("")) {
        sum = Integer.parseInt(m) + Integer.parseInt(n);
        out.write(m + "+" + n + "=" + sum);
    }
%>
<br/>
<a href="1-3-2.jsp?m=<%=m%>&n=<%=n%>&sum=<%=sum%>">跳转下一个jsp</a>
</body>
</html>
